<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/Top.jsp" %>

<div class="user-content">
  <form class="user-form" action="/Recover" method="post">
    <c:if test="${requestScope.recoverInfo != null}">
      <div class="user-form-error">
        <i class="fa-solid fa-circle-exclamation error-icon"></i>
        <p class="error-info">${requestScope.recoverInfo}</p>
      </div>
    </c:if>
    <div class="user-form-item">
      <label for="userid" class="user-form-label">
        <i class="fa-solid fa-user"></i>
      </label>
      <input type="text" class="user-form-input" name="userid" id="userid" placeholder="请输入用户名">
    </div>
    <div class="user-form-item">
      <label for="phone" class="user-form-label">
        <i class="fa fa-mobile" aria-hidden="true"></i>
      </label>
      <input type="text" class="user-form-input" name="phone" id="phone" placeholder="请输入手机号码">
    </div>
    <div class="user-form-checkcode">
      <label for="checkcode" class="user-form-checklabel">
        <i class="fa-solid fa-lock"></i>
      </label>
      <input type="text" class="user-form-check" name="checkcode" id="checkcode" autocomplete="off" placeholder="请输入验证码">
      <img id="captcha" src="/Captcha" onclick="reloadCaptcha()">
    </div>
    <script>
      function reloadCaptcha(){
        var url = "/Captcha?key=" + new Date().getMilliseconds();
        document.getElementById("captcha").setAttribute("src", url);
      }
    </script>
    <div class="user-form-item">
      <input type="submit" class="user-form-submit" value="找回账号">
    </div>
    <div class="user-form-link">
      <a href="LoginForm" class="link">返回登录>></a>
    </div>
  </form>
</div>

<%@ include file="../common/Bottom.jsp" %>